home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 1995 #5 & #6 / Amiga Plus CD - 1995 - No. 5 and 6.iso / pd / sound / octamedplayer / extras / octamed_arexx.doc next >
Text File  |  1995-03-28  |  62KB  |  2,052 lines

  1. ############################################################################
  2.  
  3.     OctaMED ARexx documentation for OctaMED AREXX version 1
  4.     (OctaMED V6.0)
  5.  
  6. Date:    29.3.1995
  7.  
  8. ############################################################################
  9.  
  10. General
  11. ~~~~~~~
  12. OctaMED's ARexx commands are divided into sections. An ARexx command
  13. generally has a form of:
  14.  
  15.     XX_COMMAND
  16.  
  17. Where XX specifies the section (e.g. SA = sample editor), COMMAND is the
  18. actual command name (documented below). Neither commands nor their keywords
  19. are case-sensitive, however some arguments passed may be (for example, the
  20. song name).
  21.  
  22. A command of form:
  23.  
  24.     XX_COMMAND ?
  25.  
  26. Returns the argument template of that command. It does nothing else.
  27.  
  28. You should generally turn on OPTIONS RESULTS on your ARexx programs that
  29. utilize OctaMED. All OctaMED commands that return information pass it in the
  30. variable RESULT. Alternatively, you can use the VAR keyword to place the
  31. result in any variable you wish. For example:
  32.  
  33.     ED_GETNUMBLOCKS VAR numblocks
  34.  
  35. Places the number of blocks to variable 'numblocks'. The VAR keyword is not
  36. mentioned in command templates. It works with all commands that return
  37. results.
  38.  
  39. You should be careful with quotes. For example, to request an answer using
  40. the command WI_REQUEST:
  41.  
  42.     WI_REQUEST "Answer YES or NO!" "Yes|No"
  43.  
  44. This would seem to work, and it does work when invoked from OctaMED's
  45. built-in command shell. However, ARexx strips off quotes around the strings,
  46. and confuses OctaMED. To make it work, you must use double quotes:
  47.  
  48.     WI_REQUEST '"Answer YES or NO!"' '"Yes|No"'
  49.  
  50. OctaMED's command shell can be used to test all ARexx commands.
  51.  
  52. When writing ARexx macros, you should be aware of the version number of
  53. OctaMED in use. You may be using macros that are not available in earlier
  54. versions. The description of each command specifies the first OctaMED ARexx
  55. version in which that command/option can be used. If no version number is
  56. specified, the command is available in all OctaMED ARexx versions. See also
  57. the description of command VE_OCTAMEDREXX.
  58.  
  59. All numeral arguments in OctaMED's ARexx commands are DECIMAL NUMBERS. Even
  60. though OctaMED displays some values in hex or other bases, ARexx commands
  61. accept and return only decimal numbers. Use ARexx's own functions to convert
  62. them, if needed. OctaMED doesn't always check the validity of the arguments,
  63. you must be sure you don't pass numbers out of range! Otherwise you may
  64. badly confuse OctaMED.
  65.  
  66. Some editing functions require argument NOTE. This is not a string, but a
  67. note number. Note number 0 = ---, 1 = C-1, 2 = C#1, 13 = C-2 and so on.
  68.  
  69. Command templates use the following specifiers for an argument:
  70.  
  71.     (none)        A string
  72.     /S        A switch, turned on if the keyword appears,
  73.             otherwise off
  74.     /N        A number is expected
  75.     /K        The keyword must appear on the command line e.g.
  76.             CMD KEY/K/N must be used like: CMD KEY 2 or
  77.             CMD KEY=2 (CMD 2 doesn't work).
  78.     /A        This argument is obligatory. Otherwise the
  79.             command fails.
  80.     /F        The rest of the command line is used as the
  81.             argument.
  82.     /M        Multiple arguments are allowed (separated with
  83.             spaces).
  84.  
  85.  
  86. Startup script
  87. ~~~~~~~~~~~~~~
  88. After starting OctaMED, OctaMED automatically attempts to execute an ARexx
  89. script "om_startup.omed". You can place any initialization commands in it,
  90. launch programs etc.
  91.  
  92. Window names
  93. ~~~~~~~~~~~~
  94. Some commands that handle windows require mnemonic window names. Below are
  95. currently defined windows:
  96.  
  97. BLOCKLIST        BLOCKPROPERTIES        EDITOR
  98. EQBAR            EQOSC            EXPANDSHRINK
  99. FONT            HIGHLIGHTOPTIONS    INFORMATION
  100. INSTLOAD        INSTPARAMS        INSTTYPE
  101. INPUTMAP        KEYBOARDOPTIONS        KEYBOARDSHORTCUTS
  102. MAINCONTROL        AURAOPTIONS        MIDIINPUTCHANNEL
  103. MIDIMESSAGEEDITOR    MISCOPTIONS        MOUSEOPTIONS
  104. NEW            NOTEECHO        PALETTE
  105. PLAYINGSEQ        PROGKEYS        PRINTOPTIONS
  106. SAMPLEEDITOR        SAMPLELIST        SAMPLELISTEDITOR
  107. SAVEOPTIONS        SAVETIMER        SAVE_PPSETTINGS
  108. SAVE_XPKSETTINGS    SA_ADDWORKSPACE        SA_ADJUSTY
  109. SA_CHANGEPITCH        SA_CHANGEVOLUME        SA_CHORDCREATION
  110. SA_NOISE        SA_DISPLAYSETTINGS    SA_ECHO
  111. SA_FILTERBOOST        SA_MIX            SECTIONLIST
  112. SMFLOADOPTIONS        SONGANNOTATION        SONGOPTIONS
  113. SONGSELECT        SPREADNOTES        SYNTHSOUNDEDITOR
  114. SY_PROGRAM        SY_STRETCH        SY_VOLUME
  115. TEMPO            TEMPOOP            TOCCATA_CAPTURE
  116. TRACKVOLUMES        TRANSPOSE
  117.  
  118. Option names
  119. ~~~~~~~~~~~~
  120. Some commands handle global option values/switches. They use
  121. mnemonic option names as well. Currently defined are:
  122.  
  123. AddPaths        Instr Menu/Add Path
  124. AdvCurs            Keyboard Options/Advance Cursor
  125. AdvLine            Keyboard Options/Advance Line
  126. AdvTrk            Keyboard Options/Advance Track
  127. AdvVoice        Keyboard Options/Advance with sound
  128. AUDIOCHANNELS        Project Menu/Audio Channels
  129. AuraActive        Aura Options/Active
  130. AuraFixedRate        Aura Options/Fixed Output Rate
  131. AuraMinPer        Aura Options/Minimum Period
  132. AuraSingleCh        Aura Options/Right channel only
  133. AutoFlush        Instr Menu/Automatic Flush
  134. AutoFreeze        Settings Menu/Auto-Freeze Screen
  135. AutoTerminate        MIDI Msg Editor/Auto-Terminate Capt.
  136. CHORD            Main Control/Chord
  137. CloseWB            Misc. Options/Close Workbench
  138. Compression        Save Options/Compression
  139. CreateIcons        Save Options/Create Icon
  140. CreateIconsForSamples    Sample Editor/Settings Menu/Create Icons...
  141. DefHQMode        Misc. Options/Default HQ Mode
  142. DefLPB            Tempo Op/Set Curr. as Def (Tempo/LPB)
  143. DefSlowHQ        Misc. Options/Default Slow HQ
  144. DefTempo        Tempo Op/Set Curr. as Def (Tempo/Tempo)
  145. DefTempoBPM        Tempo Op/Set Curr. as Def (Tempo/SPD/BPM)
  146. DefTPL            Tempo Op/Set Curr. as Def (Tempo/TPL)
  147. DefVolMode        Misc. Options/Default Volume Mode
  148. DestrSpc        Keyboard Options/Destructive Spacing
  149. EDIT            Main Control/Edit
  150. EXPSHRK_FACTOR        Expand/Shrink / Factor
  151. F6_F10_Highlights    Keyboard Options/F6-F10 = Highlights
  152. FollowSeq        Playing Sequence/Follow
  153. FourBitPalette        Palette/Palette Type
  154. HalveLoadedSamples    Instr Menu/Halve Loaded Samples
  155. HelpViewer        Misc. Options/Help Viewer
  156. HtoB            Misc. Options/H->B
  157. InstCtrlStrLoad        Misc. Options/InstCtrlStrLoad
  158. KEYMAPACTIVE        (not implemented yet)
  159. KeypadMap        Keyboard Options/Keypad Mapping
  160. KeypadMode        Keyboard Options/Keypad Mode
  161. KillBx7B00        MIDI Menu/Note Killing
  162. KillNOff        MIDI Menu/Note Killing
  163. LMB            Mouse Options/Left Button
  164. MIDIACTIVE        MIDI Menu/MIDI Active
  165. MIDIACTSENSING        MIDI Menu/Send Active Sensing
  166. MIDIEXTSYNC        MIDI Menu/Ext Sync
  167. MIDIINPUT        MIDI Menu/Input Active
  168. MIDIREADKEYUPS        MIDI Menu/Read Key-Up's
  169. MIDIREADVOLUME        MIDI Menu/Read Volume
  170. MIDISENDOUTINPUT    MIDI Menu/Send Out Input
  171. MIDISENDSYNC        MIDI Menu/Send Sync
  172. MMB            Mouse Options/Middle Button
  173. OverwriteReq        Misc. Options/Overwrite Requesters
  174. PALETTE_WB        Palette/WB Palette
  175. PolyPlay        Keyboard Options/Poly Play
  176. PlayAfterLoading    Settings Menu/Play After Loading
  177. PPBuffer        PP Settings/Speedup Buffer
  178. PPEfficiency        PP Settings/Efficiency
  179. RemPaths        Instr Menu/Remove Path
  180. ReqTools        Misc. Options/Use Reqtools
  181. ResetChord        Keyboard Options/Chord Reset
  182. RMB            Mouse Options/Right Button
  183. RoundSpc        Keyboard Options/Auto-Round Spacing
  184. SaveAllInfo        Save Options/Save Secondary Data
  185. SAVEINSTRUMENTS        Save Options/Save Instruments
  186. SAVEMULTIMOD        Save Options/Save Multi-Module
  187. SaveNotation        Save Options/Save Notation Data
  188. SaveTimer        Save Timer/Time Between Saves
  189. SaveTimerOpenWin    Save Timer/Open Save Window
  190. ShowUnusedBlocks    Block List/Show Unused
  191. SizeOnlyWindowZoom    Misc. Options/Size-Only Window Zoom
  192. SMFL_CMDPAGE_CHAFTERTOUCH    SMF Loading Options
  193. SMFL_CMDPAGE_CHANNELVOL        "
  194. SMFL_CMDPAGE_MIDIPRESET        "
  195. SMFL_CMDPAGE_MODWHEEL        "
  196. SMFL_CMDPAGE_PAN        "
  197. SMFL_CMDPAGE_PITCHBEND        "
  198. SMFL_CMDPAGE_TEMPO        "
  199. SMFL_CMDPAGE_VELOCITY        "
  200. SMFL_DONTINTERMIX        "
  201. SMFL_LINESPERBLOCK        "
  202. SMFL_MAXTRACKS            "
  203. SMFL_OFFSETADJUST        "
  204. SMFL_RESOLUTION            "
  205. SMPEDCRNOISE_LEVEL    Sample Editor/Create Noise/Level
  206. SmpEdDensity        Sample Editor/Disp. Settings/Pixel Density
  207. SmpEdDigiWVoice        Sample Editor/Sampler Voice Monitor
  208. SMPEDECHO_NUM        Sample Editor/Echo/Number of Echoes
  209. SMPEDECHO_RATE        Sample Editor/Echo/Echo Rate
  210. SMPEDECHO_VOLDECR    Sample Editor/Echo/Volume Decrease
  211. SmpEdFastGfx        Sample Editor/Disp. Settings/Fast Graphics
  212. SMPEDFB_AVERAGING    Sample Editor/Filt/Boost/Averaging
  213. SMPEDFB_DISTANCE    Sample Editor/Filt/Boost/Distance
  214. SMPEDFREEHAND        Sample Editor/Freehand
  215. SmpEdMaxVolClip        Sample Editor/Change Volume/Max Clip
  216. SmpEdMinZoom        Sample Editor/Disp. Settings/Minimum Zoom
  217. SMPEDMIX_DEST        Sample Editor/Mix/Dest. Level
  218. SMPEDMIX_SOURCE        Sample Editor/Mix/Source Level
  219. SmpEdPitch        Sample Editor/Pitch
  220. SMPEDPITCHCHG_ANTIALIAS    Sample Editor/Change Pitch/Antialias
  221. SMPEDPITCHCHG_DEST    Sample Editor/Change Pitch/Dest.
  222. SMPEDPITCHCHG_SOURCE    Sample Editor/Change Pitch/Source
  223. SmpEdPitchInHz        Sample Editor/Settings Menu/Pitch in Hz
  224. SmpEdPixelDisp        Sample Editor/Disp. Settings/Pixel
  225. SMPEDVOLCHG_END        Sample Editor/Change Volume/End
  226. SMPEDVOLCHG_START    Sample Editor/Change Volume/Start
  227. SmpEdVolClip        Sample Editor/Change Volume/Check Clip
  228. SmpEdZoomRngCent    Sample Editor/Disp. Settings/Center Zoom...
  229. SMPED_LOOPPOINT        Sample Editor/Loop Point
  230. SPACE            Main Control/Space
  231. SpaceIsDel        Keyboard Options/Space = DEL
  232. SpaceVal        Keyboard Options/Space Value
  233. SPREADVAL        Spread Notes/Width
  234. TempoOpChangeCmds    Tempo Op/Change Commands
  235. Toccata_LevelDisp    Toccata Capture/Level Display
  236. TRANSPOSE_INSTSLOTS    Transpose/Instrument Slots
  237. WarnDiskFull        Misc. Options/Warn if Disk Full
  238. XPKmethod        (don't use)
  239.  
  240. ############################################################################
  241. SECTION:    VE    (Version)
  242. ############################################################################
  243.  
  244. Command:    VE_OCTAMED
  245. Purpose:    Returns OctaMED version number.
  246. Result:        Version number, e.g. "6.0".
  247.  
  248.  
  249. Command:    VE_OCTAMEDREXX
  250. Purpose:    Returns the version number of OctaMED ARexx implementation.
  251.         This is an integral number which will be lifted always when
  252.         new commands/options have been added to OctaMED. It will
  253.         always change by one, no matter how big or small changes
  254.         have occurred since the last version.
  255. Result:        A number, e.g. 1, 2, 3...
  256.  
  257. ############################################################################
  258. SECTION:    WI    (Window)
  259. ############################################################################
  260.  
  261. Command:    WI_ACTIVATE WINDOW/A
  262. Purpose:    Activates the specified window. See above for a list of
  263.         supported names.
  264. RC:        In case of invalid window name.
  265.  
  266.  
  267. Command:    WI_CHANGEBOX WINDOW/A,X/N,Y/N,W=WIDTH/N,H=HEIGHT/N
  268. Purpose:    Change the position, width and/or height of a window.
  269.         Dimensions can be changed only if the window has a
  270.         sizing gadget.
  271. RC:        In case of invalid window name.
  272.  
  273.  
  274. Command:    WI_CLOSE WINDOW/A
  275. Purpose:    Close a window.
  276. RC:        In case of invalid window name.
  277.  
  278.  
  279. Command:    WI_ISOPEN WINDOW/A
  280. Purpose:    Tests if a specified window is currently open.
  281. Result:        0 = closed
  282.         non-zero = open
  283. RC:        In case of invalid window name.
  284.  
  285.  
  286. Command:    WI_OCTAMEDTOBACK
  287. Purpose:    Puts the OctaMED screen to back.
  288.  
  289.  
  290. Command:    WI_OCTAMEDTOFRONT
  291. Purpose:    Brings the OctaMED screen to front.
  292.  
  293.  
  294. Command:    WI_OPEN WINDOW/A
  295. Purpose:    Open a window. See above for a list of supported names.
  296. RC:        In case of error or invalid window name.
  297. Example:    WI_OPEN SAMPLEEDITOR
  298.  
  299.  
  300. Command:    WI_OPENSHELL
  301. Purpose:    Opens a new command shell window. Note that there can be
  302.         several shells open at a time!
  303.  
  304.  
  305. Command:    WI_REQUEST BODYTEXT/A,GADGETTEXT/A
  306. Purpose:    Displays a requester with one or more gadgets.
  307.         (Remember to quote the strings twice.) GADGETTEXT
  308.         specifies the gadget labels, separated by "|".
  309. Result:        0 for the rightmost choice,
  310.         1, 2, 3... for other choices (starting from left)
  311. Example:    'WI_REQUEST "Format hard disk?" '"Yes|Don''t know|No"'
  312.         Returns: 1 = Yes, 2 = Don't know, 0 = No
  313. Note:        A failure to bring up the requester (out of memory) will
  314.         return 0. Don't forget the style guide recommendation of
  315.         placing the safest choice to the right!
  316.  
  317.  
  318. Command:    WI_SHOWSTRING MESSAGE/F
  319. Purpose:    Displays a message on OctaMED's title bar. If no
  320.         message is specified, resets the title bar to its
  321.         default state.
  322.  
  323.  
  324. Command:    WI_TOBACK WINDOW/A
  325. Purpose:    Moves the specified window to back of all other windows.
  326. RC:        In case of invalid window name.
  327.  
  328.  
  329. Command:    WI_TOFRONT WINDOW/A
  330. Purpose:    Moves the specified window to front of all other windows.
  331. RC:        In case of invalid window name.
  332.  
  333.  
  334. Command:    WI_ZIP WINDOW/A
  335. Purpose:    Zooms or unzooms the specified window.
  336. RC:        In case of invalid window name.
  337.  
  338. ############################################################################
  339. SECTION:    PL    (Playing)
  340. ############################################################################
  341.  
  342. Command:    PL_CONTBLOCK
  343. Purpose:    Play block (continue from current position).
  344.  
  345.  
  346. Command:    PL_CONTSONG
  347. Purpose:    Play song (continue from current position).
  348.  
  349.  
  350. Command:    PL_GETSTATE
  351. Purpose:    Get player's current state.
  352. Result:        One of the following strings:
  353.         STOPPED
  354.         PLAYSONG
  355.         PLAYBLOCK
  356.  
  357.  
  358. Command:    PL_JUMPTOTIMERZERO
  359. Purpose:    Jumps to the position where the timer was last
  360.         reset.
  361.  
  362.  
  363. Command:    PL_NEXTALPHAKEYCHANGESINSTR
  364. Purpose:    To implement the "alpha-enter" facility of the
  365.         instrument keypad map 2. Probably never useful
  366.         for any other purpose.
  367.  
  368.  
  369. Command:    PL_PLAYBLOCK
  370. Purpose:    Play block (from the beginning).
  371.  
  372.  
  373. Command:    PL_PLAYSONG
  374. Purpose:    Play song (from the beginning).
  375.  
  376.  
  377. Command:    PL_PLAYSTATECOMMAND CMD,ELSE
  378. Purpose:    Performs one of two possible OctaMED commands,
  379.         depending on the current playing state. If
  380.         currently playing the song or a block, command
  381.         CMD is executed, otherwise ELSE.
  382.  
  383.  
  384. Command:    PL_RESETMIDI
  385. Purpose:    Resets MIDI pitchbenders, modulation wheels and
  386.         instrument presets when they are used.
  387.  
  388.  
  389. Command:    PL_RESETTIMER
  390. Purpose:    Resets the play timer.
  391.  
  392.  
  393. Command:    PL_STOP
  394. Purpose:    Stop playing.
  395.  
  396. ############################################################################
  397. SECTION:    IN    (Instrument)
  398. ############################################################################
  399.  
  400. Command:    IN_FLUSH CURR=CURRENT/S,ALL/S,UN=UNUSED/S
  401. Purpose:    Flush one or more instruments.
  402.         CURR (default) flushes only the current instrument.
  403.         ALL flushes all instruments.
  404.         UNUSED flushes all unused instruments.
  405.  
  406.  
  407. Command:    IN_GETFINETUNE
  408. Result:        Finetune value (-8 - 7).
  409.  
  410.  
  411. Command:    IN_GETHOLD
  412. Result:        Hold value.
  413.  
  414.  
  415. Command:    IN_GETDECAY
  416. Result:        Decay value.
  417.  
  418.  
  419. Command:    IN_GETDEFAULTPITCH
  420. Result:        Instrument's default pitch (note number, 0 = none).
  421.  
  422.  
  423. Command:    IN_GETEXTENDEDPRESET
  424. Result:        0 = No extended preset
  425.         1 = Extended preset.
  426.  
  427.  
  428. Command:    IN_GETMIDICHANNEL
  429. Result:        Instrument's MIDI channel (1 - 16, 0 = none).
  430.  
  431.  
  432. Command:    IN_GETMIDIPRESET
  433. Result:        Instrument's MIDI preset.
  434.  
  435.  
  436. Command:    IN_GETNAME
  437. Result:        String (instrument name).
  438.  
  439.  
  440. Command:    IN_GETNUMBER
  441. Purpose:    Get the number of currently selected instrument.
  442. Result:        Instrument number (1 - 63).
  443.  
  444.  
  445. Command:    IN_GETNUMOCTAVES
  446. Result:        The number of octaves in this sample (1 - 7). Returns 0 if
  447.         the instrument is not of type SAMPLE.
  448.  
  449.  
  450. Command:    IN_GETOUTPUT
  451. Result:        "AMIGA", "AURA" or "TOCCATA" depending on the instrument's
  452.         selected output device.
  453.  
  454.  
  455. Command:    IN_GETSUPPRESSNOTEOFF
  456. Result:        0 = Don't suppress Note Off
  457.         1 = Suppress Note Off.
  458.  
  459.  
  460. Command:    IN_GETTRANSPOSE
  461. Result:        Transpose value (-128 - 127).
  462.  
  463.  
  464. Command:    IN_GETTYPE
  465. Purpose:    Returns instrument's type.
  466. Result:        One of the following strings is returned:
  467.         EMPTY        (no instrument in this slot)
  468.         SAMPLE
  469.         SYNTH
  470.         HYBRID
  471.         EXTSAMPLE
  472.         SAMPLE16
  473.         UNKNOWN        (probably won't appear)
  474. Note:        More types may be added in future versions.
  475.  
  476.  
  477. Command:    IN_GETVOLUME
  478. Result:        Instrument's volume (0 - 64).
  479.  
  480.  
  481. Command:    IN_ISSLOTUSED SL=SLOT/N
  482. Purpose:    Tells if the specified instrument slot (1 - 63) is free
  483.         or not.
  484. Result:        1 = slot used, 0 = slot free.
  485. Note:        MIDI instruments generally have the slot unused. The slot
  486.         might belong to a MIDI instrument even if this returns 0.
  487.  
  488.  
  489. Command:    IN_ISSTEREO
  490. Purpose:    Check the stereo/mono state of the current sample:
  491. Result:        1 = current sample is stereo
  492.         0 = current sample is mono or no sample exists
  493.  
  494.  
  495. Command:    IN_LOAD NAME/A,NOSL=NOSLIST/S,CN=COMPARENAMES/S
  496. Purpose:    Loads a specified instrument from disk.
  497.         NAME = instrument name.
  498.         NOSLIST = don't search from the sample list. Usually
  499.         a full path name should be specified in this case.
  500.         COMPARENAMES = don't load if NAME and the name of the
  501.         current instrument are equal. Useful for triggering
  502.         sample changes from the song.
  503.  
  504.  
  505. Command:    IN_LOADREQ
  506. Purpose:    Opens the Load Instruments requester.
  507.  
  508.  
  509. Command:    IN_MONO
  510. Purpose:    Convert this sample to mono.
  511. RC:        If not enough memory/sample already mono/no sample
  512.  
  513.  
  514. Command:    IN_SAVE NAME,RAW/S,EIGHTSVX/S,MAUD/S,AIFF/S,WAVE/S
  515. Purpose:    Saves the sample. NAME should be a full path name.
  516.         Defaults to the EIGHTSVX format (uses MAUD for 16-bit
  517.         samples, though).
  518.  
  519.  
  520. Command:    IN_SAVEREQ RAW/S,EIGHTSVX/S,MAUD/S,AIFF/S,WAVE/S
  521. Purpose:    Opens the Save Instrument requester for saving in the
  522.         specified format (default: EIGHTSVX).
  523.  
  524.  
  525. Command:    IN_SELECT INS/N,NEXT/S,PREV/S,LAST/S,LU=LASTUSED/S,
  526.         NEXTFREE/S,PREVFREE/S,MINUS16/S,PLUS16/S,
  527.         PREVFOUND=NEARCURSOR/S,SWITCH/S
  528. Purpose:    Changes the number of the current instrument:
  529.         INS 3        goto instrument 3 (accepted values are 1-63,
  530.                 note: these are decimal numbers! Don't use
  531.                 values like 0G or 1V that OctaMED displays.
  532.         NEXT        next instrument
  533.         PREV        previous instrument
  534.         LAST        last instrument
  535.         LASTUSED    last used instrument
  536.         NEXTFREE    next free instrument slot
  537.         PREVFREE    previous free instrument slot
  538.         MINUS16        subtract 16 from current sample number
  539.         PLUS16        add 16 to current sample number
  540.         PREVFOUND/    selects the last instrument found on this
  541.           NEARCURSOR    track (above the cursor)
  542.         SWITCH        "switches" the first instr. number between
  543.                 1 and 0
  544.  
  545.  
  546. Command:    IN_SETDEFAULTPITCH NO=NOTE/N/A
  547. Purpose:    Set instrument's default pitch. (0 = none, 1 = C-1 etc.)
  548.  
  549.  
  550. Command:    IN_SETFINETUNE FT=FINETUNE/N/A
  551. Purpose:    Sets the finetune of the current instrument. Allowed
  552.         values are -8 - 7.
  553.  
  554.  
  555. Command:    IN_SETHOLDDECAY H=HOLD/N,D=DECAY/N
  556. Purpose:    Sets hold and/or decay values of the current instrument.
  557.  
  558.  
  559. Command:    IN_SETMIDICHANNEL CH=CHANNEL/N/A
  560. Purpose:    Set instrument's MIDI channel (0 - 16), 0 = none.
  561.  
  562.  
  563. Command:    IN_SETMIDIPRESET PR=PRESET/N/A,EXT=EXTENDED/S
  564. Purpose:    Set instrument's preset. if the EXTENDED switch
  565.         is set, extended preset is used, otherwise it's
  566.         cleared.
  567.  
  568.  
  569. Command:    IN_SETNAME NAME/A
  570. Purpose:    Set the name of the current instrument. (Maximum length is
  571.         39 characters.)
  572.  
  573.  
  574. Command:    IN_SETNUMOCTAVES OCTS/N/A
  575. Purpose:    Set number of octaves (1 - 7). Only valid if the instrument
  576.         type is SAMPLE.
  577.  
  578.  
  579. Command:    IN_SETOUTPUT AMIGA/S,AURA/S,TOCCATA/S
  580. Purpose:    Sets instrument's output device.
  581.  
  582.  
  583. Command:    IN_SETSUPPRESSNOTEOFF ON/S,OFF/S,TOGGLE/S
  584. Purpose:    Set/clears/toggles instrument's Note Off suppress
  585.         property.
  586.  
  587.  
  588. Command:    IN_SETTRANSPOSE TR=TRANSPOSE/N/A
  589. Purpose:    Sets the transpose of the current instrument. Allowed
  590.         values are -128 - 127.
  591.  
  592.  
  593. Command:    IN_SETTYPE SAMPLE/S,EXTSAMPLE/S,SYNTHETIC/S,HYBRID/S,SAMPLE16/S
  594. Purpose:    Changes instrument type.
  595. Note:        Not all type changes can be carried out. The following
  596.         changes can be used:
  597.         SAMPLE <-> EXTSAMPLE
  598.         (EXT)SAMPLE <-> SAMPLE16
  599.         (EXT)SAMPLE <-> HYBRID
  600.         (EXT)SAMPLE(16) -> SYNTHETIC    (sample discarded)
  601.         SYNTHETIC -> SAMPLE        (synthsound discarded)
  602.  
  603. Command:    IN_SETVOLUME VOL/N,INCREASE/S,DECREASE/S
  604. Purpose:    Set instrument's volume (0 - 64), or optionally INCREASE
  605.         or DECREASE it by one.
  606.  
  607.  
  608. Command:    IN_STEREO
  609. Purpose:    Convert this sample to stereo.
  610. RC:        If not enough memory/sample already stereo/no sample
  611.  
  612.  
  613. Command:    IN_SWAPINSTRUMENTS SLOT1/N/A,SLOT2/N/A
  614. Purpose:    Swaps two instruments. Instrument numbers are given.
  615.         It only exchanges the instruments, song data is not
  616.         modified.
  617.  
  618. ############################################################################
  619. SECTION:    SA    (Sample editor)
  620. ############################################################################
  621.  
  622. Command:    SA_ADJUSTYRANGE S=SHIFT/N/A
  623. Purpose:    Adjusts the selected range in vertical direction.
  624.         (See Adjust Y -function of sample editor)
  625.         SHIFT is an 8-bit adjust value (although the
  626.         adjustment will be made in 16 bits, 8-bit resolution
  627.         was considered sufficient for this parameter).
  628.  
  629.  
  630. Command:    SA_BOOST AVG=AVERAGING/N,D=DISTANCE/N
  631. Purpose:    Will boost the selected range (see Filter/Boost
  632.         window of the sample editor). If either or both
  633.         values are not supplied, the values in the F/B
  634.         window will be used.
  635.  
  636.  
  637. Command:    SA_BUFFERTOSAMPLE
  638. Purpose:    Copies the contents of the buffer to the sample.
  639.         The old sample will be discarded.
  640.  
  641.  
  642. Command:    SA_CENTRALIZESAMPLE
  643. Purpose:    Centralizes the entire sample in vertical direction.
  644.         Similar to SA_ADJUSTYRANGE, but affects the entire
  645.         sample and automatically calculates a suitable value
  646.         for centralizing the sample.
  647.  
  648.  
  649. Command:    SA_CHANGEPITCH S=SOURCE/N,D=DEST/N,AA=ANTIALIAS/S
  650. Purpose:    Changes the pitch of the current sample. SOURCE and
  651.         DEST are period values. If they are not supplied,
  652.         values in the Change Pitch window will be used.
  653.         ANTIALIAS turns antialiasing on (otherwise off).
  654.  
  655.  
  656. Command:    SA_CHANGEVOL S=START/N,E=END/N,CLIP/S,NOCLIP/S
  657. Purpose:    Changes the volume of the selected range. START and
  658.         END are specified in percents, as in the Change Volume
  659.         window. CLIP specifies clipping, NOCLIP makes OctaMED
  660.         avoid clipping, otherwise the setting in the Ch. Volume
  661.         window will be used. To maximize the volume, you can
  662.         use high values with NOCLIP, e.g.:
  663.         SA_CHANGEVOL 999 999 NOCLIP
  664.  
  665.  
  666. Command:    SA_CHANGESIZE SIZE/N/A,C=CLEAR/S,RE=RETAINATEND/S,REQ/S
  667. Purpose:    Changes the size of the current sample. By default,
  668.         this function retains the existing sample at the
  669.         beginning. If CLEAR is specified, the entire sample
  670.         is cleared, if RETAINATEND is specified, the existing
  671.         sample will be retained at the end. Finally, REQ
  672.         instructs OctaMED to ask the user if the existing
  673.         sample should be kept.
  674.  
  675.  
  676. Command:    SA_CHOPRANGE
  677. Purpose:    Chops the selected range.
  678.  
  679.  
  680. Command:    SA_CLEARRANGE
  681. Purpose:    Clears the selected range.
  682.  
  683.  
  684. Command:    SA_COPYRANGE
  685. Purpose:    Copies the selected range to the copy buffer.
  686.  
  687.  
  688. Command:    SA_CREATECHORD N=NOTES/N/M/A,FV=FULLVOL/S,NFV=NOFULLVOL/S,
  689.         ET=ERASETRAIL/S,NET=NOERASETRAIL/S
  690. Purpose:    Creates a chord of specified notes. NOTES define the note
  691.         numbers of the chord (up to 4 notes can be given).
  692.         FULLVOL/NOFULLVOL override the Full Volume switch of the
  693.         Create Chord window. ERASETRAIL/NOERASETRAIL override the
  694.         Erase Trailing Notes switch.
  695. Example:    Create a major chord of three notes:
  696.         SA_CREATECHORD 1 5 8
  697.  
  698.  
  699. Command:    SA_CREATENOISE L=LEVEL/N
  700. Purpose:    Adds noise to the selected range.
  701.  
  702.  
  703. Command:    SA_CUTRANGE
  704. Purpose:    Cuts the selected range.
  705.  
  706.  
  707. Command:    SA_DELRANGE
  708. Purpose:    Erases the selected range.
  709.  
  710.  
  711. Command:    SA_ECHO NUM/N,R=RATE/N,VD=VOLDECR/N
  712. Purpose:    Creates echoes. See the Echo Window documents for the
  713.         purpose of the parameters.
  714.  
  715.  
  716. Command:    SA_ERASE TS=TOSTART/S,TE=TOEND/S,BL=BEFORELOOP/S,
  717.         AL=AFTERLOOP/S
  718. Purpose:    Erases a part of the current sample.
  719.         TOSTART    erases from the beginning of the range to the
  720.             start of the sample.
  721.         TOEND    (default) erases from the end of the range to
  722.             the end of the sample.
  723.         BEFORELOOP    erases from the beginning of the sample
  724.                 to the beginning of the loop.
  725.         AFTERLOOP    erases from the end of the loop to the
  726.                 end of the sample.
  727.  
  728.  
  729. Command:    SA_FILTER AVG=AVERAGING/N,D=DISTANCE/N
  730. Purpose:    Filters the selected range. See the Filter/Boost window
  731.         documents.
  732.  
  733.  
  734. Command:    SA_GETBUFFERLENGTH
  735. Purpose:    Get the size of the copy buffer.
  736. Result:        Copy buffer size. (0 if the buffer is empty.)
  737.  
  738.  
  739. Command:    SA_GETDISPLAYCHANNEL
  740. Purpose:    Returns the currently displayed channel of a stereo
  741.         sample.
  742. Result:        String, one of the following:
  743.         LEFT    (also returned for mono samples)
  744.         RIGHT
  745.         BOTH
  746. RC:        If no sample in memory.
  747.  
  748.  
  749. Command:    SA_GETDISPLAYSIZE
  750. Result:        The size of the currently displayed part of the sample.
  751. RC:        If no sample in memory.
  752.  
  753.  
  754. Command:    SA_GETDISPLAYSTART
  755. Result:        Position of the beginning of the display (from the
  756.         beginning of the sample).
  757. RC:        If no sample in memory.
  758.  
  759.  
  760. Command:    SA_GETLOOPLENGTH
  761. Result:        Length of the loop.
  762.  
  763.  
  764. Command:    SA_GETLOOPSTART
  765. Result:        Beginning of the loop.
  766.  
  767.  
  768. Command:    SA_GETLOOPSTATE
  769. Result:        1 = loop active, 0 = loop not active
  770.  
  771.  
  772. Command:    SA_GETRANGEEND
  773. Result:        Returns the range end position.
  774. RC:        If no sample in memory.
  775.  
  776.  
  777. Command:    SA_GETRANGESTART
  778. Result:        Returns the range start position.
  779. RC:        If no sample in memory.
  780.  
  781.  
  782. Command:    SA_GETSAMPLE O=OFFSET/N/A
  783. Purpose:    For actual editing of the sample waveform.
  784.         OFFSET is the position from the beginning of the
  785.         sample. Allowed values are 0 - (SAMPLELENGTH-1).
  786. Result:        Returns the sample value at the given position.
  787.         This number is always in 16-bit range (regardless
  788.         of the actual sample resolution), -32768 being the
  789.         lowest, 32767 the highest possible value. (I.e.
  790.         signed arithmetic must be used.)
  791. RC:        If no sample in memory.
  792.  
  793.  
  794. Command:    SA_GETSAMPLELENGTH
  795. Result:        Returns the length of the current sample.
  796. RC:        If no sample in memory.
  797.  
  798.  
  799. Command:    SA_INVERTRANGE
  800. Purpose:    Flips the selected range upside down.
  801.  
  802.  
  803. Command:    SA_MIX SL=SOURCELEVEL/N,DL=DESTLEVEL/N
  804. Purpose:    Mixes the copy buffer with the selected range. See
  805.         Mix Window documentation.
  806.  
  807.  
  808. Command:    SA_MONITOR AS=ALLOWSAMPLING/S
  809. Purpose:    Activates the sampler monitor display. It can be
  810.         deactivated only by the user. If ALLOWSAMPLING is
  811.         specified, the text "LMB = start sampling - RMB = cancel"
  812.         will appear, and sampling is allowed.
  813.  
  814.  
  815. Command:    SA_PASTE OW=OVERWRITE/S
  816. Purpose:    Pastes the buffer to the current position. If OVERWRITE
  817.         is specified, the buffer contents will overwrite existing
  818.         data instead of inserting.
  819.  
  820.  
  821. Command:    SA_PLAY D=DISPLAY/S,R=RANGE/S,CB=CBUFF/S,LO=LOOP/S,
  822.         TU=TUNING/S
  823. Purpose:    Plays the specified part of the sample:
  824.         DISPLAY plays the display.
  825.         RANGE plays the range.
  826.         CBUFF plays the copy buffer.
  827.         LOOP plays the loop.
  828.         TUNING plays the tuning tone.
  829.  
  830.  
  831. Command:    SA_RANGE S=START/N,E=END/N,A=ALL/S,LO=LOOP/S
  832. Purpose:    Sets the range. START/END are absolute offsets in the
  833.         sample, ALL selects the entire sample, LOOP selects the
  834.         loop.
  835.  
  836.  
  837. Command:    SA_RANGETOSYNTHED
  838. Purpose:    Copies the range to synth editor wave buffer.
  839.  
  840.  
  841. Command:    SA_REFRESH
  842. Purpose:    Refreshes the sample display (see SA_SETSAMPLE).
  843.  
  844.  
  845. Command:    SA_REMUNUSEDSPACE
  846. Purpose:    Removes the unused space from both ends of the sample.
  847.  
  848.  
  849. Command:    SA_REVERSERANGE
  850. Purpose:    Reverses the selected range.
  851.  
  852.  
  853. Command:    SA_SAMPLETOBUFFER
  854. Purpose:    Copies the whole sample to the copy buffer.
  855.  
  856.  
  857. Command:    SA_SCROLLDISPLAY L=LEFT/S,R=RIGHT/S,STEP/N
  858. Purpose:    Scrolls the sample editor display LEFT or RIGHT. By
  859.         default, one step is 50 % of the display size, but
  860.         you can override it by specifying STEP (it's a
  861.         percentage - a value of 100 scrolls one screenful.)
  862.  
  863.  
  864. Command:    SA_SETDISPLAYCHANNEL BOTH/S,L=LEFT/S,R=RIGHT/S
  865. Purpose:    Changes the display mode of a stereo sample.
  866.  
  867.  
  868. Command:    SA_SETLOOP S=START/N,L=LENGTH/N,KE=KEEPEND/S,R=RANGE/S,
  869.         D=DISPLAY/S,SA=SAMPLE/S
  870. Purpose:    Sets the loop. START/LENGTH specify the absolute positions.
  871.         If only START is specified, the length remains constant,
  872.         unless KEEPEND is set (which keeps the end position intact).
  873.         RANGE sets the loop to range, DISPLAY to display, SAMPLE
  874.         to the whole sample.
  875.  
  876.  
  877. Command:    SA_SETLOOPSTATE ON/S,OFF/S
  878. Purpose:    Turns the loop on or off.
  879.  
  880.  
  881. Command:    SA_SETSAMPLE O=OFFSET/N/A,V=VALUE/N/A
  882. Purpose:    For editing the actual sample waveform. Sets the sample data
  883.         at the specified position (OFFSET may be 0 - SAMPLELENGTH-1).
  884.         The VALUE is a 16-bit signed number, regardless of the actual
  885.         resolution of the sample. -32768 is the lowest, 32767 is the
  886.         highest allowed value.
  887. Note:        For sake of speed, this command does not refresh the
  888.         displayed waveform. When you are done with modifying the
  889.         sample, call SA_REFRESH to refresh the display.
  890. RC:        If no sample in memory, or if invalid OFFSET is given.
  891.  
  892.  
  893. Command:    SA_SHOW S=START/N,L=LENGTH/N,R=RANGE/S,A=ALL/S,LO=LOOP/S
  894. Purpose:    Sets the display to the specified part of the sample.
  895.         START/LENGTH specify the display area in an absolute way.
  896.         RANGE shows the range, ALL shows the whole sample, LOOP
  897.         shows the loop.
  898.  
  899.  
  900. Command:    SA_SWAPBUFFERWITHSAMPLE
  901. Purpose:    Swaps the copy buffer with the sample. This call doesn't
  902.         involve any copying or memory allocations, so it's pretty
  903.         fast.
  904.  
  905.  
  906. Command:    SA_ZOOM IN/S,OUT/S
  907. Purpose:    Halves or doubles the size of the display (i.e. zooms IN or
  908.         OUT).
  909.  
  910. ############################################################################
  911. SECTION:    SG    (Song)
  912. ############################################################################
  913.  
  914. Command:    SG_CLEARALLSONGS
  915. Purpose:    Clears all songs. Doesn't ask any confirmation.
  916.  
  917.  
  918. Command:    SG_CLEARCURRENTSONG
  919. Purpose:    Clears the current song.
  920.  
  921.  
  922. Command:    SG_DELETESONG CURRENT=HERE/S,LAST/S
  923. Purpose:    Deletes either the current (CURRENT, default) or the LAST
  924.         song of the multi-module. If there's only one song, this
  925.         command does nothing.
  926.  
  927.  
  928. Command:    SG_DISCARDANNOTEXT
  929. Purpose:    Discards the long annotation text, if there's any.
  930.  
  931.  
  932. Command:    SG_GETANNOSTRING
  933. Result:        Returns the current (short) annotation string.
  934.  
  935.  
  936. Command:    SG_FORGETMODIFICATIONS
  937. Purpose:    This command will clear OctaMED's internal "modified"-flag.
  938.         (See also SG_ISMODIFIED.) After this command, OctaMED thinks
  939.         there have been no changes since the song was last saved.
  940.         Use with care!
  941.  
  942.  
  943. Command:    SG_GETCHANNELMODE
  944. Result:        Returns the current channel mode: 4 - 8.
  945.  
  946.  
  947. Command:    SG_GETCURRENTSONGNUMBER
  948. Result:        Returns the number of the current song (1 - NUMBEROFSONGS).
  949.  
  950.  
  951. Command:    SG_GETFILESIZE MMD2/S,MMD1/S,MMD0/S,SMF0/S,MULTIMOD/S,
  952.         CURRSONG/S
  953. Purpose:    Calculates and returns the unpacked file size of the
  954.         multi-module (default) or the current song in desired file
  955.         format.
  956. Result:        File size in bytes.
  957.  
  958.  
  959. Command:    SG_GETFILTER
  960. Result:        Returns the state of the hardware audio filter (1 or 0).
  961.  
  962.  
  963. Command:    SG_GETHQ
  964. Result:        Returns the state of the HQ switch (1 or 0).
  965.  
  966.  
  967. Command:    SG_GETMASTERVOL
  968. Result:        Returns the current master volume (1 - 64).
  969.  
  970.  
  971. Command:    SG_GETNAME
  972. Result:        Returns the name of the current song (string).
  973.  
  974.  
  975. Command:    SG_GETNUMBEROFSONGS
  976. Result:        Returns the number of songs.
  977.  
  978.  
  979. Command:    SG_GETPLAYTRANSPOSE
  980. Result:        Returns the current play transpose value.
  981.  
  982.  
  983. Command:    SG_GETSLIDEMODE
  984. Result:        Returns the slide mode. Either 'NO1ST' or 'STD'.
  985.  
  986.  
  987. Command:    SG_GETTEMPO
  988. Result:        Returns the main SPD or BPM tempo.
  989.  
  990.  
  991. Command:    SG_GETTEMPOLPB
  992. Result:        Returns the Lines per Beat value (only used in BPM mode).
  993.  
  994.  
  995. Command:    SG_GETTEMPOMODE
  996. Result:        Returns the current tempo mode (either 'SPD' or 'BPM').
  997.  
  998.  
  999. Command:    SG_GETTEMPOTPL
  1000. Result:        Returns the Pulses per Line value (a.k.a. the secondary
  1001.         tempo).
  1002.  
  1003.  
  1004. Command:    SG_GETTRACKVOL TRACK/N/A
  1005. Result:        Returns the track volume (1 - 64) of the specified track
  1006.         (0 - 63).
  1007.  
  1008.  
  1009. Command:    SG_GETVOLMODE
  1010. Result:        Returns the current volume mode ('HEX' or 'DEC').
  1011.  
  1012.  
  1013. Command:    SG_GOTOSONG SONGNUM/N,NEXT/S,PREV/S,LAST/S,NEXTORAPPEND/S
  1014. Purpose:    Selects the song. SONGNUM is the number of the song.
  1015.         NEXT/PREV select the next or the previous song, and LAST
  1016.         selects the last song. NEXTORAPPEND is the same as NEXT,
  1017.         except if the last song is currently selected, a new one
  1018.         is created (with a requester).
  1019.  
  1020.  
  1021. Command:    SG_ISMODIFIED
  1022. Result:        Returns a non-zero value if the song has been modified
  1023.         since it's been loaded or saved. Otherwise returns 0.
  1024.  
  1025.  
  1026. Command:    SG_ISTRACKON TRK=TRACK/N
  1027. Result:        Returns the on/off (1/0) state of the specified track.
  1028.         If track not specified, current track is assumed.
  1029.  
  1030.  
  1031. Command:    SG_ISTRACKSELECTED TRK=TRACK/N
  1032. Result:        Returns the selected/deselected (1/0) state of the
  1033.         specified track.
  1034.         If track not specified, current track is assumed.
  1035.  
  1036.  
  1037. Command:    SG_LOAD NAME,FORCE/S
  1038. Purpose:    Loads a song/module into memory. If NAME is not specified,
  1039.         the Load Song file requester appears. This command returns
  1040.         an error, if the song has been modified, unless FORCE is
  1041.         set.
  1042. RC:        Fails, if song modified and FORCE not set.
  1043.  
  1044.  
  1045. Command:    SG_LOADANNOTEXT NAME
  1046. Purpose:    Loads the specified text file and binds it to the current
  1047.         module. (See Song Annotation Window documents.) If NAME is
  1048.         not specified, a file requester appears.
  1049.  
  1050.  
  1051. Command:    SG_NEWSONG HERE/S,LAST/S
  1052. Purpose:    Creates a new song either at the current position (HERE) or
  1053.         after the last song (LAST, default).
  1054.  
  1055.  
  1056. Command:    SG_SAVE NAME,FULLNAME/K,MMD2/S,MMD1/S,MMD0/S,SMF0/S,EXEC/S,
  1057.         MULTIMOD/S,CURRSONG/S
  1058. Purpose:    Saves the current song (CURRSONG) or multi-module (MULTIMOD,
  1059.         default) in the specified file format (MMD2, MMD1, MMD0, SMF0
  1060.         or EXEC). If NAME is specified, the file is saved relative
  1061.         to the currently used save path (see also SG_SETSAVEPATH).
  1062.         If you specify FULLNAME, you have to specify the entire path,
  1063.         which will replace the existing save path.
  1064.  
  1065.  
  1066. Command:    SG_SAVEANNOTEXT NAME
  1067. Purpose:    Saves the long annotation text (see Song Annotation Window)
  1068.         to a separate file. If NAME is not specified, a file
  1069.         requester appears.
  1070.  
  1071.  
  1072. Command:    SG_SETANNOSTRING STRING/F
  1073. Purpose:    Sets the (short) annotation string (Song Annotation Window).
  1074.         If no arguments appear, the string is cleared.
  1075.  
  1076.  
  1077. Command:    SG_SETCHANNELMODE MODE/N/A
  1078. Purpose:    Sets the channel mode. Valid values are 4 - 8.
  1079.  
  1080.  
  1081. Command:    SG_SETFILTER ON/S,OFF/S
  1082. Purpose:    Sets the state of the hardware audio filter.
  1083.  
  1084.  
  1085. Command:    SG_SETHQ ON/S,OFF/S
  1086. Purpose:    Sets HQ on or off.
  1087.  
  1088.  
  1089. Command:    SG_SETMASTERVOL VOL/N/A
  1090. Purpose:    Sets the master volume. Allowed values are 1 - 64.
  1091.  
  1092.  
  1093. Command:    SG_SETNAME NAME/A/F
  1094. Purpose:    Sets the name of the current song.
  1095.  
  1096.  
  1097. Command:    SG_SETPLAYTRANSPOSE TRANSP/N/A
  1098. Purpose:    Sets play transpose (-12 - +12).
  1099.  
  1100.  
  1101. Command:    SG_SETSAVENAME NAME/A
  1102. Purpose:    Sets the default save file name of the current project.
  1103.         This is the file name that appears in the Save Options
  1104.         window. See also the next command.
  1105. Note:        This should only be used for setting the file name.
  1106.         Use the next command for the path.
  1107.  
  1108.  
  1109. Command:    SG_SETSAVEPATH PATH/A
  1110. Purpose:    Sets the default save file name and path of the current
  1111.         project. This is the file name/path that appears in the
  1112.         Save Options window. The path should be a full path
  1113.         specification of the directory where saved songs should
  1114.         be placed.
  1115.  
  1116.  
  1117. Command:    SG_SETSLIDEMODE STD/S,NO1ST/S
  1118. Purpose:    Sets the slide mode.
  1119.  
  1120.  
  1121. Command:    SG_SETTEMPO BPM=SPD/N,TPL/N,LPB/N
  1122. Purpose:    Sets the current tempo. BPM/SPD sets the main tempo,
  1123.         TPL sets the secondary tempo (ticks per line), and LPB
  1124.         sets Lines per Beat (only in BPM mode).
  1125.  
  1126.  
  1127. Command:    SG_SETTEMPOMODE SPD/S,BPM/S
  1128. Purpose:    Sets the tempo mode. Nowadays BPM is recommended for
  1129.         general usage.
  1130.  
  1131.  
  1132. Command:    SG_SETTRACKSTATE TRK=TRACK/N/A,ON/S,OFF/S,TOGGLE/S,SEL/S,
  1133.         DESEL/S,TOGGLESEL/S
  1134. Purpose:    Sets the state of the specified track. ON/OFF/TOGGLE
  1135.         affect the track's playing status. SEL/DESEL/TOGGLESEL
  1136.         affect the selected state of the track.
  1137.  
  1138.  
  1139. Command:    SG_SETTRACKSTATES ON/S,OFF/S
  1140. Purpose:    Sets all tracks ON or OFF.
  1141.  
  1142.  
  1143. Command:    SG_SETTRACKVOL TRACK/N/A,VOL/N/A
  1144. Purpose:    Sets the track volume of TRACK (0 - 63). VOL may be 1 - 64.
  1145.  
  1146.  
  1147. Command:    SG_SETVOLMODE DEC/S,HEX/S
  1148. Purpose:    Sets the volume mode (DECimal or HEX).
  1149.  
  1150.  
  1151. Command:    SG_SHOWFREEMEMORY
  1152. Purpose:    Displays the free memory on OctaMED's title bar. Used for
  1153.         Ctrl-F.
  1154.  
  1155.  
  1156. Command:    SG_TEMPO_DECREASE TPL/S
  1157. Purpose:    Mainly for OctaMED keyboard shortcuts. Decreases the main
  1158.         tempo, or if TPL set, the TPL value.
  1159.  
  1160.  
  1161. Command:    SG_TEMPO_INCREASE TPL/S
  1162. Purpose:    Mainly for OctaMED keyboard shortcuts. Increases the main
  1163.         tempo, or if TPL set, the TPL value.
  1164.  
  1165.  
  1166. Command:    SG_VOLCONVERT TOHEX/S,TODEC/S,REQ/S
  1167. Purpose:    Converts the volume commands of the song. TOHEX converts
  1168.         everything from decimal to hex, TODEC does the opposite.
  1169.         REQ asks the user.
  1170.  
  1171. ############################################################################
  1172. SECTION:    OP    (Options)
  1173. ############################################################################
  1174.  
  1175. Command:    OP_GET OPT/A
  1176. Purpose:    Returns the current value of the specified option. (See
  1177.         above for a list of options.) The values depend on the type
  1178.         of the object (i.e. gadget or menu) that is used to control
  1179.         the option. Generally, the following rules apply:
  1180.  
  1181.         Object type        Allowed values
  1182.         ~~~~~~~~~~~        ~~~~~~~~~~~~~~
  1183.         Checkbox or menu    0 = not checked
  1184.         items with toggling    1 = checked
  1185.         checkmarks.
  1186.  
  1187.         Cycle gadget        0 = first item (not necessarily the
  1188.                         default!)
  1189.                     X-1 = last item (where X = total
  1190.                         number of items the gadget has).
  1191.  
  1192.         Slider or integer    Same as the gadget's values.
  1193.         gadgets
  1194.  
  1195.         MX (Radio) gadget    0 = topmost item
  1196.                     X-1 = last item (X = total number of
  1197.                           items).
  1198. Result:        Option value.
  1199. RC:        10 if OPT is invalid (not recognized).
  1200.  
  1201.  
  1202. Command:    OP_GETKEYBOARDOCT
  1203. Purpose:    Returns the keyboard edit octaves currently in use.
  1204. Result:        A number: 0 = octaves 1+2, 1 = 2+3, 2 = 3+4 etc.
  1205.  
  1206. Command:    OP_LOADKEYBOARDSHORTCUTS NAME/A
  1207. Purpose:    Loads keyboard shortcuts from disk. NAME should be a full
  1208.         path name.
  1209.  
  1210.  
  1211. Command:    OP_LOADSETTINGS NAME/A
  1212. Purpose:    Loads a settings file from disk. NAME should be a full path
  1213.         name. Loaded settings will change immediately to their new
  1214.         states. Options not mentioned in the settings file won't be
  1215.         modified.
  1216.  
  1217.  
  1218. Command:    OP_MULTICMD CMD/M
  1219. Purpose:    Allows execution of multiple OctaMED commands. Simply
  1220.         executes the given commands in succession.
  1221. Note:        Since you can't nest quotation marks, you can't execute
  1222.         commands which need spaces in their arguments.
  1223.  
  1224.  
  1225. Command:    OP_REPEATCMD TIMES/N,CMD/F
  1226. Purpose:    Repeats the given command the specified number of times.
  1227.         You can combine this command with OP_MULTICMD to repeat
  1228.         a sequence of commands.
  1229.  
  1230.  
  1231. Command:    OP_SAVEKEYBOARDSHORTCUTS NAME/A
  1232. Purpose:    Saves current keyboard shortcuts to disk. NAME should be a
  1233.         full path name.
  1234.  
  1235.  
  1236. Command:    OP_SET OPT/A,VAL/N,ON/S,OFF/S,TOGGLE/S
  1237. Purpose:    Changes the state/value of the specified option. (See above
  1238.         for a list of options.) If the option has only two states
  1239.         (checkbox gadgets or toggling menus), you must specify ON,
  1240.         OFF or TOGGLE keyword to change the state. Otherwise a
  1241.         number is expected. See OP_GET description for the allowed
  1242.         range.
  1243. WARNING:    OctaMED does NO range checking on the specified numeric
  1244.         values!! You must be absolutely sure you pass valid in-range
  1245.         values! Otherwise OctaMED may get badly confused, even a
  1246.         crash might occur under some conditions! You've been warned.
  1247. RC:        10 if OPT is invalid (not recognized).
  1248.  
  1249.  
  1250. Command:    OP_SETKEYBOARDOCT OCT/N,FKEY/K/N
  1251. Purpose:    Sets the current keyboard edit octaves. Use only values
  1252.         1 - 9 for OCT (1 = 1+2, 2 = 2+3, 3 = 3+4 etc.). FKEY, if
  1253.         specified, overrides OCT, and corresponds function keys
  1254.         F1 - F5. (Acceptable values for FKEY are 1 - 5, 1 = F1...
  1255.         5 = F5).
  1256.  
  1257.  
  1258. Command:    OP_TOGGLEBETWEEN OPT/A,VAL1/N/A,VAL2/N/A
  1259. Purpose:    Toggles a NON-BOOLEAN option (i.e. not a checkbox) between
  1260.         two possible values. If option OPT is currently neither VAL1
  1261.         nor VAL2, it won't be changed.
  1262.  
  1263.  
  1264. Command:    OP_UPDATE ON/S,OFF/S
  1265. Purpose:    Turns display updating (editor and information windows) on
  1266.         or off. It can be used for speeding and cleaning up long
  1267.         operations. OP_UPDATE ON updates the display.
  1268.  
  1269. ############################################################################
  1270. SECTION:    SY    (Synth editor)
  1271. ############################################################################
  1272.  
  1273. Command:    SY_ADDWAVES
  1274. Purpose:    Adds the right waveform to the left one.
  1275.  
  1276.  
  1277. Command:    SY_CHANGEVOL VAL/N/A
  1278. Purpose:    Changes the volume of the selected range. VAL is specified
  1279.         in percents (100 = no change, 50 = halve, 200 = double etc.)
  1280.  
  1281.  
  1282. Command:    SY_CLEARRANGE
  1283. Purpose:    Clears the selected range.
  1284.  
  1285.  
  1286. Command:    SY_CLEARWAVE
  1287. Purpose:    Clears the current waveform.
  1288.  
  1289.  
  1290. Command:    SY_COPYRANGE
  1291. Purpose:    Copies the selected range to the right waveform.
  1292.  
  1293.  
  1294. Command:    SY_COPYWAVE TOTEMP/S,FROMTEMP/S
  1295. Purpose:    Copies a waveform. TOTEMP copies from right to left,
  1296.         FROMTEMP from left to right.
  1297.  
  1298.  
  1299. Command:    SY_CUTRANGE
  1300. Purpose:    Cuts the selected range.
  1301.  
  1302.  
  1303. Command:    SY_DELPROGCOMMAND VOL/S,WF/S
  1304. Purpose:    Deletes a command/number in the program. VOL deletes from
  1305.         the volume program, WF from the waveform program.
  1306.  
  1307.  
  1308. Command:    SY_DELWAVE L=LAST/S
  1309. Purpose:    Deletes a waveform. If LAST specified, the last waveform
  1310.         is deleted, otherwise the current.
  1311.  
  1312.  
  1313. Command:    SY_DOUBLERANGE
  1314. Purpose:    Doubles the selected range.
  1315.  
  1316.  
  1317. Command:    SY_GETNUMBEROFWAVES
  1318. Purpose:    Gets the number of waveforms in this synthsound.
  1319. Result:        Number of waveforms.
  1320.  
  1321.  
  1322. Command:    SY_GETPROGCOMMAND O=OFFSET/N/A,VOL/S,WF/S
  1323. Purpose:    Returns the program command. OFFSET specifies the position
  1324.         in either VOL or WF program.
  1325. Result:        A string, such as 'JMP' or '12' or '7F'.
  1326. RC:        If OFFSET is out of range.
  1327.  
  1328.  
  1329. Command:    SY_GETPROGCURSORX
  1330. Result:        Returns the horizontal position of the cursor
  1331.         (A number between 0 and 5.)
  1332.  
  1333.  
  1334. Command:    SY_GETPROGLENGTH VOL/S,WF/S
  1335. Purpose:    Get the length of the program.
  1336. Result:        A number.
  1337.  
  1338.  
  1339. Command:    SY_GETPROGLINE
  1340. Result:        Current line number. (May exceed program length.)
  1341.  
  1342.  
  1343. Command:    SY_GETPROGSPEED VOL/S,WF/S
  1344. Result:        The execution speed of the program.
  1345.  
  1346.  
  1347. Command:    SY_GETSAMPLE O=OFFSET/N/A
  1348. Purpose:    Returns a sample from the current waveform at a specified
  1349.         position.
  1350. Result:        A 16-bit signed number (-32768 - 32767). Note that 16-bit
  1351.         resolution is used even though synthsounds are currently
  1352.         always in 8 bits!
  1353.  
  1354.  
  1355. Command:    SY_GETSELECTEDWAVE
  1356. Purpose:    Indicates which (left or right) waveform is currently
  1357.         selected (has range in it).
  1358. Result:        0 = left, 1 = right
  1359.  
  1360.  
  1361. Command:    SY_GETWAVELENGTH
  1362. Purpose:    Returns the length of the current waveform.
  1363. Result:        A number (2 - 128, in steps of two).
  1364.  
  1365.  
  1366. Command:    SY_GETWAVENUM
  1367. Result:        Returns the number of the currently selected wave.
  1368.  
  1369.  
  1370. Command:    SY_GOTOPROGLINE L=LINE/N/A
  1371. Purpose:    Go to the specified line in the program editor.
  1372.  
  1373.  
  1374. Command:    SY_GOTOWAVE WAVE/N,NEXT/S,PREV/S
  1375. Purpose:    Go to the specified waveform.
  1376.  
  1377.  
  1378. Command:    SY_MIXWAVES
  1379. Purpose:    Mix the right waveform to the left.
  1380.  
  1381.  
  1382. Command:    SY_MOVEPROGCURSOR POS/N,LEFT/S,RIGHT/S,UP/S,DOWN/S,FKEY/K/N
  1383. Purpose:    Moves the cursor in the program editor. POS specifies
  1384.         an absolute X-position (0 - 5). LEFT/RIGHT/UP/DOWN are
  1385.         self-explanatory. FKEY (use only values 0 - 4) perform
  1386.         the function of pressing keys F6 - F10 (0 = F6 etc.)
  1387.  
  1388.  
  1389. Command:    SY_NEW
  1390. Purpose:    Creates a new synthsound.
  1391.  
  1392.  
  1393. Command:    SY_NEWWAVE H=HERE/S
  1394. Purpose:    Creates a new waveform. Either inserts a new one HERE
  1395.         or appends after the last one (default).
  1396.  
  1397.  
  1398. Command:    SY_NOISE
  1399. Purpose:    Sets the current waveform to noise.
  1400.  
  1401.  
  1402. Command:    SY_PASTERANGE
  1403. Purpose:    Pastes the right waveform to the left.
  1404.  
  1405.  
  1406. Command:    SY_PULSE
  1407. Purpose:    Sets the current waveform to pulse.
  1408.  
  1409.  
  1410. Command:    SY_RAMPDOWN
  1411. Purpose:    Sets the current waveform to ramp down.
  1412.  
  1413.  
  1414. Command:    SY_RAMPUP
  1415. Purpose:    Sets the current waveform to ramp up.
  1416.  
  1417.  
  1418. Command:    SY_RANGE S=START/N,E=END/N,A=ALL/S
  1419. Purpose:    Sets the range.
  1420.  
  1421.  
  1422. Command:    SY_REVERSERANGE
  1423. Purpose:    Reverses the selected range.
  1424.  
  1425.  
  1426. Command:    SY_SETPROGRAM PROGRAM/M/A,VOL/S,WF/S,INS=INSERT/S
  1427. Purpose:    Enters a VOL or WF program. If INSERT is specified,
  1428.         the program will be inserted at the current line.
  1429.         Otherwise the entire program will be set (don't
  1430.         forget the last END command!).
  1431. Example:    SY_SETPROGRAM 64 CHD 2 END VOL
  1432.         Sets the volume program to:
  1433.              40
  1434.             CHD
  1435.              02
  1436.             END
  1437. Note:        Unlike SY_GETPROGRAM, numeric values must be entered
  1438.         as decimal numbers! SY_GETPROGRAM returns them in hex.
  1439.  
  1440.  
  1441. Command:    SY_SETPROGSPEED VOL/K/N,WF/K/N
  1442. Purpose:    Sets the execution speed of either or both programs.
  1443.  
  1444.  
  1445. Command:    SY_SETSAMPLE O=OFFSET/N/A,V=VALUE/N/A
  1446. Purpose:    Sets a sample in the current waveform at position
  1447.         OFFSET. VALUE is a signed 16-bit number (-32768 -
  1448.         +32767). Display is refreshed after this command.
  1449.  
  1450.  
  1451. Command:    SY_SETSELECTEDWAVE TEMP/S,ACTUAL/S
  1452. Purpose:    Selects either the right (TEMP) or the left (ACTUAL)
  1453.         waveform.
  1454.  
  1455.  
  1456. Command:    SY_SETWAVELENGTH LENGTH/N/A
  1457. Purpose:    Sets the length of the current waveform. Accepted
  1458.         values are 2 - 128.
  1459.  
  1460.  
  1461. Command:    SY_SHIFTRANGE L=LEFT/S,R=RIGHT/S
  1462. Purpose:    Shifts the selected range to left or right.
  1463.  
  1464.  
  1465. Command:    SY_SINE
  1466. Purpose:    Sets the current waveform to sine.
  1467.  
  1468.  
  1469. Command:    SY_STRETCH DIST/N/A
  1470. Purpose:    Stretches the current waveform at the cursor. DIST
  1471.         specifies the distance to stretch. A negative value
  1472.         stretches left, a positive to the right.
  1473.  
  1474.  
  1475. Command:    SY_SWAPWAVES
  1476. Purpose:    Exchanges the left and right waveforms.
  1477.  
  1478.  
  1479. Command:    SY_TRIANGLE
  1480. Purpose:    Sets the current waveform to triangle.
  1481.  
  1482.  
  1483. Command:    SY_UNDO
  1484. Purpose:    Undoes the last editing operation.
  1485.  
  1486.  
  1487. Command:    SY_WAVETRANSFORMATION START/N/A,END/N/A
  1488. Purpose:    Transforms a waveform to another. START and END specify
  1489.         the start and end waveforms.
  1490.  
  1491. ############################################################################
  1492. SECTION:    ED    (Edit)
  1493. ############################################################################
  1494.  
  1495. Command:    ED_ADVANCELINE LINES/N,UP/S,DOWN/S,FKEY/K/N,SPC=SPACING/S,
  1496.         USESETT/S
  1497. Purpose:    Advances the cursor UP or DOWN the specified number of LINES
  1498.         (default 1). If SPACING is set, the current space value will
  1499.         be used. (Note: spacing must be turned on.) If you specify
  1500.         FKEY (values 6 - 10), the cursor is moved to the corresponding
  1501.         line as if F6 - F10 was pressed. USESETT will use the Keyboard
  1502.         Options window settings for advancing the cursor.
  1503.  
  1504.  
  1505. Command:    ED_CHANGECMDPAGE PAGE/N,NEXT/S,PREV/S,CYCLEFWD/S
  1506. Purpose:    Changes the displayed command page. PAGE is an absolute
  1507.         page number (starting at 0). NEXT/PREV are self-explanatory,
  1508.         CYCLEFWD cycles forward, jumping to the first page after the
  1509.         last.
  1510.  
  1511.  
  1512. Command:    ED_CHANGECMDPAGE PAGE/N,NEXT/S,PREV/S,CYCLEFWD/S
  1513. Purpose:    Changes the displayed command page. PAGE is an absolute
  1514.         page number (starting at 0). NEXT/PREV are self-explanatory,
  1515.         CYCLEFWD cycles forward, jumping to the first page after the
  1516.         last.
  1517.  
  1518.  
  1519. Command:    ED_CLEARNOTECMD NOTE/S,CMD/S,ALLPAGES/S
  1520. Purpose:    Clears the current note and/or command values. NOTE and
  1521.         CMD switches specify which parts are cleared. By default
  1522.         only clears the command on the current page, unless
  1523.         ALLPAGES is set. Also takes Space in account and clears
  1524.         all notes in the spacing range.
  1525.  
  1526.  
  1527. Command:    ED_CLEARSEQ FORCE/S
  1528. Purpose:    Clears the current playing sequence. Requests the user for
  1529.         confirmation, unless FORCE exists.
  1530.  
  1531.  
  1532. Command:    ED_CREATESLIDE VOL/S,GEN/S,PITCH1/S,PITCH2/S
  1533. Purpose:    Generates a slide. VOL = volume slide, GEN = generic slide,
  1534.         PITCH1 = pitch slide (using cmd 3), PITCH2 = pitch slide
  1535.         (using cmds 1 and 2).
  1536.  
  1537.  
  1538. Command:    ED_DELETEBLOCK HERE=CURRENT/S,LAST/S
  1539. Purpose:    Deletes the LAST or current (HERE, default) block.
  1540.  
  1541.  
  1542. Command:    ED_DELETENOTE B=BLOCK/K/N,L=LINE/K/N,T=TRACK/K/N,DELSPACE/N
  1543. Purpose:    Deletes a note and moves the following notes on that track
  1544.         one line upwards. BLOCK/LINE/TRACK specify the position, by
  1545.         default the current cursor position is used. DELSPACE is the
  1546.         number of notes to remove (default = 1).
  1547.  
  1548.  
  1549. Command:    ED_DELETEPLAYSEQ
  1550. Purpose:    Deletes the current entry of the playing sequence.
  1551.  
  1552.  
  1553. Command:    ED_DELETESECLIST
  1554. Purpose:    Deletes the current entry of the section list.
  1555.  
  1556.  
  1557. Command:    ED_DELETESECTION
  1558. Purpose:    Deletes the current playing sequence list (section).
  1559.  
  1560.  
  1561. Command:    ED_ENTERNOTE NOTE/N,PROGKEY/K/N,HOLD/S
  1562. Purpose:    Enters a note to the current position (as if it had been
  1563.         entered using the keyboard). NOTE is the note number,
  1564.         zero is the same as pressing DEL. If PROGKEY exists, the
  1565.         desired programmable key definition is pasted. HOLD enters
  1566.         the hold symbol.
  1567.  
  1568.  
  1569. Command:    ED_FINDSAMPLEOCCURRENCE PREV/S,NEXT/S
  1570. Purpose:    Finds the NEXT or PREVious occurrence of the current
  1571.         sample.
  1572.  
  1573.  
  1574. Command:    ED_GETBLOCKNAME B=BLOCK/N
  1575. Result:        Returns the name of the current, or specified block.
  1576.  
  1577.  
  1578. Command:    ED_GETCURRBLOCK
  1579. Result:        Returns the number of the current block.
  1580.  
  1581.  
  1582. Command:    ED_GETCURRLINE
  1583. Result:        Returns the current line number (in decimal).
  1584.  
  1585.  
  1586. Command:    ED_GETCURRPAGE
  1587. Result:        Returns the currently displayed command page.
  1588.  
  1589.  
  1590. Command:    ED_GETCURRPLAYSEQ
  1591. Result:        Returns the current position in the current playing
  1592.         sequence list.
  1593.  
  1594.  
  1595. Command:    ED_GETCURRSECLIST
  1596. Result:        Returns the current position in the section list.
  1597.  
  1598.  
  1599. Command:    ED_GETCURRSECTION
  1600. Result:        Returns the number of the current playing sequence list
  1601.         (section).
  1602.  
  1603.  
  1604. Command:    ED_GETCURRTRACK
  1605. Result:        Returns the number of the current track (on which the cursor
  1606.         is).
  1607.  
  1608.  
  1609. Command:    ED_GETDATA B=BLOCK/K/N,L=LINE/K/N,T=TRACK/K/N,P=PAGE/K/N,
  1610.         NOTE/S,INUM/S,CMDNUM=CMDTYPE/S,QUAL=CMDLVL/S,PRTALL/S
  1611. Purpose:    Returns data from the song. BLOCK/LINE/TRACK/PAGE specify
  1612.         the position data is fetched from. (Defaults to cursor
  1613.         position.) The other arguments specify which data you want
  1614.         to get. (Only one item can be fetched per command.)
  1615.         NOTE returns the note number (0 = ---, 1 = C-1, 2 = C#1..).
  1616.         INUM returns the instrument number (0 = none).
  1617.         CMDNUM returns the command number (0 - 255).
  1618.         QUAL returns the command qualifier (0 - 255).
  1619.         PRTALL returns the textual representation of a note and its
  1620.         command, for example: 'C-3 20000'.
  1621. Note:        Don't assume that the ranges remain constant. They might be
  1622.         raised. In particular, don't attempt to interpret PRTALL
  1623.         (it should only be displayed to the user), the note format
  1624.         is not guaranteed to stay constant.
  1625.  
  1626.  
  1627. Command:    ED_GETLINEHIGHLIGHT B=BLOCK/K/N,L=LINE/N
  1628. Result:        Returns the highlight state of a line.
  1629.  
  1630.  
  1631. Command:    ED_GETNUMBLOCKS
  1632. Result:        Returns the total number of blocks in memory.
  1633.  
  1634.  
  1635. Command:    ED_GETNUMLINES B=BLOCK/N
  1636. Result:        Returns the length of the current or specified block.
  1637.  
  1638.  
  1639. Command:    ED_GETNUMPAGES B=BLOCK/N
  1640. Result:        Returns the number of pages on the current or specified
  1641.         block.
  1642.  
  1643.  
  1644. Command:    ED_GETNUMPLAYSEQ
  1645. Result:        Returns the length of the current playing sequence list.
  1646.  
  1647.  
  1648. Command:    ED_GETNUMSECLIST
  1649. Result:        Returns the length of the section list.
  1650.  
  1651.  
  1652. Command:    ED_GETNUMSECTIONS
  1653. Result:        Returns the total number of playing sequence lists
  1654.         (sections).
  1655.  
  1656.  
  1657. Command:    ED_GETNUMTRACKS B=BLOCK/N
  1658. Result:        Returns the number of tracks on the current or specified
  1659.         block.
  1660.  
  1661.  
  1662. Command:    ED_GETPLAYSEQBLOCK O=OFFSET/N
  1663. Result:        Returns the block number from the playing sequence list at
  1664.         offset OFFSET.
  1665.  
  1666.  
  1667. Command:    ED_GETPREVIOUSINUM
  1668. Result:        Returns the previous instrument number on the current track.
  1669.  
  1670.  
  1671. Command:    ED_GETSECLISTSECTION O=OFFSET/N
  1672. Result:        Extracts data from the section list at OFFSET (default =
  1673.         current position). Returns the playing sequence list number
  1674.         (section number).
  1675.  
  1676.  
  1677. Command:    ED_GETSECTIONNAME
  1678. Result:        Returns the name of the current playing sequence list
  1679.         (section).
  1680.  
  1681.  
  1682. Command:    ED_GOTO B=BLOCK/K/N,L=LINE/K/N,T=TRACK/K/N,P=PAGE/K/N
  1683. Purpose:    Moves the cursor to the specified position.
  1684.  
  1685.  
  1686. Command:    ED_GOTOBLOCK PREV/S,NEXT/S,FIRST/S,LAST/S,FIRSTLINE/S,
  1687.         FIRSTPAGE/S
  1688. Purpose:    Mainly to support different OctaMED keyboard shortcuts.
  1689.         Jump to PREV/NEXT/FIRST/LAST block. If FIRSTLINE is set,
  1690.         also jumps to the first line on that block. If FIRSTPAGE
  1691.         is set, jumps also to the first command page.
  1692.  
  1693.  
  1694. Command:    ED_GOTOCMDPAGE PAGE/N,NEXT/S,PREV/S,CYCLEFWD/S
  1695. Purpose:    Changes the displayed command page. PAGE is an absolute
  1696.         page number (starting at 0). NEXT/PREV are self-explanatory,
  1697.         CYCLEFWD cycles forward, jumping to the first page after the
  1698.         last.
  1699.  
  1700.  
  1701. Command:    ED_GOTOPLAYSEQ NUM/N,PREV/S,NEXT/S,FIRST/S,LAST/S,BOTTOM/S,
  1702.         JUMPED/S,JUMPPLAY/S
  1703. Purpose:    Changes the current position at the playing sequence list.
  1704.         NUM sets the absolute position, PREV/NEXT/FIRST/LAST move
  1705.         onto the corresponding entry on the list. BOTTOM jumps
  1706.         past the last number, so you can insert new entries at the
  1707.         bottom of the list. JUMPED instructs the editor to jump
  1708.         onto the first line of the block in that position.
  1709.         JUMPPLAY does the same, but only while playing.
  1710. RC:        If out of range.
  1711.  
  1712.  
  1713. Command:    ED_GOTOSECLIST SECPOS/N/A
  1714. Purpose:    Changes the position in the section list.
  1715.  
  1716.  
  1717. Command:    ED_GOTOSECTION SECT/N/A
  1718. Purpose:    Changes the current playing sequence list (section).
  1719. RC:        If SEQL out of range.
  1720.  
  1721.  
  1722. Command:    ED_GOTOTRACK PREVNOTE/S,NEXTNOTE/S,NEXTCHORD/S,FIRST/S,
  1723.         LAST/S,PREVDISP/S,NEXTDISP/S
  1724. Purpose:    Mainly to support different OctaMED keyboard shortcuts.
  1725.         Moves the cursor:
  1726.         PREVNOTE/NEXTNOTE    onto the prev/next note
  1727.         NEXTCHORD        to next chord track
  1728.         FIRST            to the first track
  1729.         LAST            to the last track
  1730.         PREVDISP/NEXTDISP    scrolls the display 1 screenful
  1731.  
  1732.  
  1733. Command:    ED_HIGHLIGHTLINE B=BLOCK/K/N,L=LINE/N,ON/S,OFF/S,TOGGLE/S
  1734. Purpose:    Highlights, dehighlights, or toggles the current or
  1735.         specified line
  1736.  
  1737.  
  1738. Command:    ED_INSERTEMPTYNOTE B=BLOCK/K/N,L=LINE/K/N,T=TRACK/K/N,
  1739.         INSSPACE/N
  1740. Purpose:    Inserts an empty note at the cursor (or the specified
  1741.         position), scrolling the following notes on that track
  1742.         downwards. INSSPACE controls the number of notes inserted
  1743.         (default = 1).
  1744.  
  1745.  
  1746. Command:    ED_ISBLOCKINSEQ B=BLOCK/N
  1747. Purpose:    Scans sections in the section list and checks if the
  1748.         specified or current block exists in the playing sequence.
  1749. Result:        0 = doesn't exist (block is unused) - or block number invalid
  1750.         1 = the block exists in the playing sequence
  1751.  
  1752.  
  1753. Command:    ED_KILLNOTES CURRTRACK/S,ALLTRACKS/S,CBS=CHANGEBLOCKSIZE/S
  1754. Purpose:    Kills the notes below the cursor. CURRTRACK only kills the
  1755.         notes on that track, ALLTRACKS kills all notes following
  1756.         the current one. CHANGEBLOCKSIZE kills all notes by changing
  1757.         the block size.
  1758.  
  1759.  
  1760. Command:    ED_MOVECURSOR LEFT/S,RIGHT/S,NOTE/S,INUM/S,CMDNUM1=CMDTYPE1/S,
  1761.         CMDNUM2=CMDTYPE2/S,QUAL1=CMDLVL1/S,QUAL2=CMDLVL2/S
  1762. Purpose:    Moves the cursor left or right, or relative to the current
  1763.         note, onto the specified number.
  1764.  
  1765.  
  1766. Command:    ED_NEWBLOCK HERE=INSERT/S,LAST=APPEND/S,TRACKS/N/K,
  1767.         LINES/N/K,PAGES/N/K
  1768. Purpose:    Creates a new block, either HERE, or after the LAST block.
  1769.         You can also specify its size.
  1770. RC:        10, if incorrect sizes are given or if the creation fails
  1771.         (due to lack of memory).
  1772.  
  1773.  
  1774. Command:    ED_NEWPLAYSEQ BLOCK/N,CURRBLOCK/S,COPYBLOCK/S
  1775. Purpose:    Inserts a new entry to the playing sequence list at current
  1776.         position. COPYBLOCK copies the previous block number there,
  1777.         CURRBLOCK inserts the current block number, BLOCK can be
  1778.         used to specify any block. (Default = CURRBLOCK.)
  1779.  
  1780.  
  1781. Command:    ED_NEWSECLIST INSERT=HERE/S,APPEND=LAST/S
  1782. Purpose:    INSERTs or APPENDs a new entry to the section list.
  1783.  
  1784.  
  1785. Command:    ED_NEWSECTION INSERT=HERE/S,APPEND=LAST/S
  1786. Purpose:    Creates a new playing sequence list (section), either
  1787.         INSERTing or APPENDing it to currently existing sequence
  1788.         lists.
  1789. RC:        10, if creation failed (no memory).
  1790.  
  1791.  
  1792. Command:    ED_NUMBERTONOTE NOTE/N/A
  1793. Purpose:    Converts a note number to a string. E.g. 2 is converted to
  1794.         'C#1'.
  1795. Result:        A string representing the note.
  1796.  
  1797.  
  1798. Command:    ED_PICKPROGKEYNOTE PROGKEY/N/A
  1799. Purpose:    Picks the note/commands the cursor is on to the specified
  1800.         programmable key slot.
  1801.  
  1802.  
  1803. Command:    ED_PLAYNOTE NOTE/N,INUM/N,TRACK/N
  1804. Purpose:    Plays a note. NOTE is a note number (Default = instrument's
  1805.         default pitch), INUM instrument number (Default = current
  1806.         instrument), and TRACK is a track number (Default = current
  1807.         track).
  1808.  
  1809.  
  1810. Command:    ED_SETBLOCKLINES B=BLOCK/N/K,LINES/N/A
  1811. Purpose:    Changes the length of the current/specified block.
  1812. RC:        If LINES < 1 or LINES > 3200.
  1813.  
  1814.  
  1815. Command:    ED_SETBLOCKNAME B=BLOCK/K/N,NAME
  1816. Purpose:    Sets a block's name.
  1817.  
  1818.  
  1819. Command:    ED_SETBLOCKPAGES B=BLOCK/N/K,PAGES/N/A
  1820. Purpose:    Adds/removes command pages. PAGES is the new number of
  1821.         pages.
  1822. RC:        If PAGES is out of range.
  1823.  
  1824.  
  1825. Command:    ED_SETBLOCKTRACKS B=BLOCK/N/K,TRACKS/N/A
  1826. Purpose:    Changes a block's width.
  1827. RC:        If TRACKS is out of range.
  1828.  
  1829.  
  1830. Command:    ED_SETDATA B=BLOCK/K/N,L=LINE/K/N,T=TRACK/K/N,P=PAGE/K/N,
  1831.         NOTE/K/N,INUM/K/N,CMDNUM=CMDTYPE/K/N,QUAL=CMDLVL/K/N,ALTCMD/S
  1832. Purpose:    Changes notes/data. BLOCK/LINE/TRACK/PAGE specify the
  1833.         position of the note to change.
  1834.         NOTE changes the note.
  1835.         INUM changes the instrument number.
  1836.         CMDNUM changes the command number.
  1837.         QUAL changes the command qualifier.
  1838.         ALTCMD places the Right-Alt prg. key definition.
  1839. Example:    This inserts a note 'C-2 30205':
  1840.         ED_SETDATA NOTE 13 INUM 3 CMDNUM 2 QUAL 5
  1841. See also:    The next command:
  1842.  
  1843.  
  1844. Command:    ED_SETDATA_UPDATE ON/S,OFF/S
  1845. Purpose:    By default, ED_SETDATA redraws the display after changing
  1846.         the data. You can turn this temporarily off by this command.
  1847.         If you're doing a lot of changes, this is much faster.
  1848.         OFF turns refreshing off.
  1849.         ON turns it back on.
  1850.         With no arguments, redraws the display.
  1851. Note:        Always remember to turn this back on after done. Otherwise
  1852.         other macros might fail to refresh the display.
  1853.  
  1854.  
  1855. Command:    ED_SETPLAYSEQBLOCK O=OFFSET/N,B=BLOCK/N,INCREASE/S,DECREASE/S
  1856. Purpose:    Edits the playing sequence list. INCREASE/DECREASE modify
  1857.         the selected/current value by one.
  1858. RC:        If INCREASE/DECREASE over/underflow
  1859.  
  1860.  
  1861. Command:    ED_SETSECLISTSECTION O=OFFSET/N,SC=SECNUM/N
  1862. Purpose:    Edits the section list.
  1863. RC:        If OFFSET or SEQLISTNUM is out of range.
  1864.  
  1865.  
  1866. Command:    ED_SETSECTIONNAME NAME
  1867. Purpose:    Sets the name of the current playing sequence list
  1868.         (section).
  1869.  
  1870.  
  1871. Command:    ED_SWAPNOTEWITH FOLL=FOLLOWING/S,RIGHT/S
  1872. Purpose:    Swaps the current note with the FOLLOWING note or the
  1873.         note on the RIGHT.
  1874.  
  1875. ############################################################################
  1876. SECTION:    RN    (Range)
  1877. ############################################################################
  1878.  
  1879. Command:    RN_CANCELRANGE
  1880. Purpose:    Discards the range.
  1881.  
  1882.  
  1883. Command:    RN_CHANGEINUM SRC/N,DEST/N,CHANGE/S,EXCHANGE=SWAP/S,
  1884.         DELNOTES/S,AFFECT/K/N
  1885. Purpose:    Changes instrument numbers throughout the specified range.
  1886.         SRC/DEST specify the source and destination numbers. (If
  1887.         not specified, values will be taken from the Transpose
  1888.         window.) CHANGE changes SRC to DEST. EXCHANGE swaps them.
  1889.         DELNOTES deletes all instances of SRC.
  1890.  
  1891.         AFFECT is a numeric value that specifies the range to
  1892.         affect:
  1893.             1 = the entire song
  1894.             2 = current block
  1895.             3 = selected track
  1896.             4 = current track
  1897.             5 = ranged area
  1898.  
  1899.         (If not specified, the value in the Transpose window will
  1900.         be used.)
  1901.  
  1902.  
  1903. Command:    RN_CHANGENOTES SRC/N,DEST/N,CHANGE/S,EXCHANGE=SWAP/S,
  1904.         AFFECT/K/N
  1905. Purpose:    Changes notes throughout the specified range. SRC/DEST
  1906.         specify the source and destination notes (0 = '---'), if
  1907.         not specified, values in the Transpose window will be used.
  1908.         CHANGE changes SRC to DEST, EXCHANGE swaps them.
  1909.  
  1910.         AFFECT is a numeric value that specifies the range to
  1911.         affect (see RN_CHANGEINUM).
  1912.  
  1913.  
  1914. Command:    RN_COPY RANGE/S,TRACK/S,BLOCK/S
  1915. Purpose:    Copies a RANGE/TRACK/BLOCK.
  1916.  
  1917.  
  1918. Command:    RN_CUT RANGE/S,TRACK/S,BLOCK/S
  1919. Purpose:    Cuts a RANGE/TRACK/BLOCK.
  1920.  
  1921.  
  1922. Command:    RN_DELETELINE LINE/N
  1923. Purpose:    Deletes the current or specified line.
  1924.  
  1925.  
  1926. Command:    RN_DELETETRACK TRACK/N,WHOLESONG/S
  1927. Purpose:    Deletes the current or specified track. WHOLESONG deletes
  1928.         the same-numbered track throughout the entire song.
  1929.  
  1930.  
  1931. Command:    RN_DISCARDBUFFERS
  1932. Purpose:    Discards all copy buffers.
  1933.  
  1934.  
  1935. Command:    RN_ERASE RANGE/S,TRACK/S,BLOCK/S
  1936. Purpose:    Clears the RANGE/TRACK/BLOCK.
  1937.  
  1938.  
  1939. Command:    RN_EXPANDBLOCK FACTOR/N
  1940. Purpose:    Expands the block. FACTOR, if specified, changes the
  1941.         Factor value in the Expand/Shrink window.
  1942. RC:        In case of error or invalid FACTOR.
  1943.  
  1944.  
  1945. Command:    RN_GETRANGEENDLINE
  1946. Purpose:    Returns the line number of the last ranged line.
  1947. RC:        If no range selected.
  1948.  
  1949.  
  1950. Command:    RN_GETRANGEENDTRACK
  1951. Purpose:    Returns the track number of the last ranged track.
  1952. RC:        If no range selected.
  1953.  
  1954.  
  1955. Command:    RN_GETRANGESTARTLINE
  1956. Purpose:    Returns the line number of the first ranged line.
  1957. RC:        If no range selected.
  1958.  
  1959.  
  1960. Command:    RN_GETRANGESTARTTRACK
  1961. Purpose:    Returns the track number of the first ranged track.
  1962. RC:        If no range selected.
  1963.  
  1964.  
  1965. Command:    RN_GETSPACINGFROMRANGE
  1966. Purpose:    Gets the spacing from range. (See Alt-~ shortcut.)
  1967.  
  1968.  
  1969. Command:    RN_INSERTLINE LINE/N
  1970. Purpose:    Inserts an empty line at LINE or current line.
  1971.  
  1972.  
  1973. Command:    RN_INSERTTRACK TRACK/N,WHOLESONG/S
  1974. Purpose:    Inserts an empty track.
  1975.  
  1976.  
  1977. Command:    RN_ISRANGED
  1978. Purpose:    Tells if the range is currently displayed or not.
  1979. Result:        0 = no range, 1 = a range exists.
  1980.  
  1981.  
  1982. Command:    RN_JOINBLOCKS
  1983. Purpose:    Joins the current block with the next one.
  1984. RC:        If fails.
  1985.  
  1986.  
  1987. Command:    RN_NOTEECHO DIST/N,MINVOL/N
  1988. Purpose:    Echoes the range. DIST is the distance between echoes.
  1989.         MINVOL is the minimum volume to use.
  1990. RC:        In case of error or no range.
  1991.  
  1992.  
  1993. Command:    RN_PASTE RANGE/S,TRACK/S,BLOCK/S,TS=TOSELECTED/S
  1994. Purpose:    Pastes the RANGE/TRACK/BLOCK. TOSELECTED applies to
  1995.         RANGE only, if selected, skips unselected tracks when
  1996.         pasting.
  1997.  
  1998.  
  1999. Command:    RN_SETRANGE STARTTRACK/N,STARTLINE/N,ENDTRACK/N,ENDLINE/N,
  2000.         TRACK/K/N,LINE/K/N,CURRBLOCK/S,CURRTRACK/S
  2001. Purpose:    Sets the range area. STARTTRACK/LINE and ENDTRACK/LINE
  2002.         specify absolute values for the range. TRACK ranges the
  2003.         specified track, LINE the specified line. CURRBLOCK/TRACK
  2004.         range the current block or track, respectively.
  2005.  
  2006.  
  2007. Command:    RN_SHRINKBLOCK FACTOR/N
  2008. Purpose:    Shrinks the block. FACTOR, if specified, changes the
  2009.         Factor value in the Expand/Shrink window.
  2010. RC:        In case of error or invalid FACTOR.
  2011.  
  2012.  
  2013. Command:    RN_SPLITBLOCK LINE/N
  2014. Purpose:    Splits the current block at current or specified LINE.
  2015. RC:        In case of failure.
  2016.  
  2017.  
  2018. Command:    RN_SPREADNOTES WIDTH/N
  2019. Purpose:    Spreads the ranged notes (see Spread window).
  2020. RC:        In case of failure.
  2021.  
  2022.  
  2023. Command:    RN_SWAP TRACK/S,BLOCK/S
  2024. Purpose:    Swaps the current track or block with the copy buffer.
  2025.  
  2026.  
  2027. Command:    RN_TRANSPOSE HSUP/S,HSDOWN/S,OCTUP/S,OCTDOWN/S,AFFECT/K/N,
  2028.         ALLINSTRS/S,CURRINSTR/S
  2029. Purpose:    Transposes the specified area:
  2030.         HSUP = halfstep up
  2031.         HSDOWN = halfstep down
  2032.         OCTUP = octave up
  2033.         OCTDOWN = octave down.
  2034.  
  2035.         AFFECT - see RN_CHANGEINUM.
  2036.         ALLINSTRS = affect all instruments
  2037.         CURRINSTR = affect current instrument
  2038.         (If neither ALLINSTRS nor CURRINSTR is given, the gadget
  2039.         state in Transpose window is checked.)
  2040.  
  2041. ############################################################################
  2042. SECTION:    MM    (MIDI Message editor)
  2043. ############################################################################
  2044. Note:        This section only has one command to support the required
  2045.         keyboard functions. Full ARexx control does not exist due
  2046.         to the probable fact that it would be used quite seldom.
  2047.         However, if there's a lot of demand, full control can be
  2048.         added in a future version.
  2049.  
  2050. Command:    MM_MOVECURSOR LEFT/S,RIGHT/S,UP/S,DOWN/S
  2051. Purpose:    Quite obvious.
  2052.